import React from 'react';
import { axconst } from '@/shared/axconst';
import AxColumnAction from '@/components/AxList/AxColumnAction';
import { AxStandardWideList } from '@/components/AxList/AxStandardWideList';
import Search from './components/search';

const Index: React.FC<any> = props => {
    /** 配置列 */
    const columns = [
        {
            title: '消息内容',
            dataIndex: 'orgName1',
            width: axconst.width.longx,
        },
        {
            title: '消息类型',
            dataIndex: 'orgName2',
            width: axconst.width.long,
        },
        {
            title: '时间',
            dataIndex: 'orgName3',
            width: axconst.width.time,
        },
        {
            title: '操作',
            dataIndex: 'orgName8',
            width: axconst.width.operate8,
            render: (val: any, record: any) => (
                <AxColumnAction
                    buttons={[
                        {
                            text: '查看详情',
                            group: false,
                            onClick: () => { },
                        },
                    ]}
                />
            ),
        },
    ];

    const data = {
        list: [{
            id: 0,
            orgName0: '浓硫酸',
            orgName1: '探火工程项目经费通过通知',
            orgName2: '系统消息',
            orgName3: '2020-01-01 11:10:09',
            orgName4: '￥8.20',
            orgName5: '库存：9000',
            orgName6: '管控：非管控',
            orgName7: '包装:1瓶',
            orgName8: '性状：固体',
            orgName9: '销量：0',
            orgName10: '分类编码：1093859-61-0',
            orgName11: '0'

        }, {
            id: 1,
            orgName0: '2',
            orgName1: '探火工程项目经费拒绝通知',
            orgName2: '系统消息',
            orgName3: '2020-01-01 11:10:10',
            orgName4: '固体',
            orgName5: 'g',
            orgName6: '1000000',
            orgName7: '1',
            orgName8: '通过审核',
            orgName9: '1',
            orgName10: '1',
            orgName11: '1'

        }]
    }

    return (
        <>
            <AxStandardWideList
                columns={columns}
                data={data}
                AdvancedSearch={Search}
            />
        </>
    );
};

export default Index;
